import request from '@/config/axios'

export interface LabelTableVO {
  id: number
  labelType: string
  labelName: string
}

// 查询标签列表
export const getLabelTablePage = async (params) => {
  return await request.get({ url: `/hutai/label-table/page`, params })
}

// 查询标签详情
export const getLabelTable = async (id: number) => {
  return await request.get({ url: `/hutai/label-table/get?id=` + id })
}

export const getLabelTableList = async () => {
  return await request.get({ url: `/hutai/label-table/list` })
}

// 新增标签
export const createLabelTable = async (data: LabelTableVO) => {
  return await request.post({ url: `/hutai/label-table/create`, data })
}

// 修改标签
export const updateLabelTable = async (data: LabelTableVO) => {
  return await request.put({ url: `/hutai/label-table/update`, data })
}

// 删除标签
export const deleteLabelTable = async (id: number) => {
  return await request.delete({ url: `/hutai/label-table/delete?id=` + id })
}

// 导出标签 Excel
export const exportLabelTable = async (params) => {
  return await request.download({ url: `/hutai/label-table/export-excel`, params })
}
